package com.util;

import com.minimoment.base.BaseAction;
import com.minimoment.model.domain.Movie;
import com.minimoment.model.domain.Screenings;
import com.minimoment.model.domain.ScreeningsItem;
import com.minimoment.model.service.ScreeningsService;
import com.minimoment.util.ToolAction.SelfDefineUtil;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by etund on 2014/11/2.
 */
public class SelfDefine {

    /**
     * 将Float类型转化为int类型
     * @param f
     * @return
     */
    public static int reverse(float f){
        return (int)f;
    }

    /**
     * 省略字数
     * @param str
     * @param i
     * @return
     */
    public static String simple(String str , Integer i){
        if(str.length()>i){
            return str.substring(0,i)+"...";
        }
        return  str;
    }


}
